Ext.define('js.user.UserAuthList', {
    extend: 'Ext.container.Container',
   // requires: ['js.Util', 'js.ctrl.Common'],
   // controller: 'Common',
    layout: {
        type: 'hbox',
        pack: 'start',
        align: 'stretch'
    },
    defaults: {layout: 'fit', border: false},
    initComponent: function () {
        this.UserGroupList = Ext.create('js.user.UserGroupList');
        this.DepartmentList = Ext.create('js.user.DepartmentList');
        this.items = [
            {flex:1, items: this.DepartmentList},
            {flex:1, items: this.UserGroupList}
        ];

        this.callParent(arguments);
    },
    itemClick: function (view, record, item, index, e) {
        let group_id = record.get('group_id');
        let store = this.userList.getStore();
        store.getProxy().setExtraParam('group_id', group_id);
        store.load();
    }
});